<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"sekla.cn","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"valine","storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="Linux地址映射机制讨论地址映射机制（逻辑地址和物理地址的映射）">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux下地址映射机制">
<meta property="og:url" content="http://sekla.cn/2021/12/15/linux-memModel-memMap/index.html">
<meta property="og:site_name" content="Sekla&#39;s Blog">
<meta property="og:description" content="Linux地址映射机制讨论地址映射机制（逻辑地址和物理地址的映射）">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/HvFjZ7rQlKbEuGk.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/PFewWKVGyORZv4o.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/573pEORuBlGXJwj.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/GSDAweblWMZNjV1.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/ySNVu67sdR4UhEq.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/U7oXP2IjbSDM6kG.png">
<meta property="og:image" content="c:/Users/shentio/AppData/Roaming/Typora/typora-user-images/image-20211215141911458.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/F1YVbXJDmIrcnxU.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/SVrwE8oi2vjPs6R.png">
<meta property="og:image" content="https://s2.loli.net/2021/12/15/qXAFfoadrRlz1W6.png">
<meta property="og:image" content="https://s2.loli.net/2022/01/11/VT7vRQs8K3jBaG1.png">
<meta property="article:published_time" content="2021-12-15T04:00:00.000Z">
<meta property="article:modified_time" content="2022-01-11T12:44:53.672Z">
<meta property="article:author" content="Sekla">
<meta property="article:tag" content="C">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s2.loli.net/2021/12/15/HvFjZ7rQlKbEuGk.png">

<link rel="canonical" href="http://sekla.cn/2021/12/15/linux-memModel-memMap/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Linux下地址映射机制 | Sekla's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script type="text/javascript" src="/js/my_js/clicklove.js"></script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Sekla's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Keep Learning Keep Doing</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">14</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">23</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">100</span></a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://sekla.cn/2021/12/15/linux-memModel-memMap/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Sekla">
      <meta itemprop="description" content="Sekla">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Sekla's Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Linux下地址映射机制
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-12-15 12:00:00" itemprop="dateCreated datePublished" datetime="2021-12-15T12:00:00+08:00">2021-12-15</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-01-11 20:44:53" itemprop="dateModified" datetime="2022-01-11T20:44:53+08:00">2022-01-11</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" itemprop="url" rel="index"><span itemprop="name">操作系统</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/Linux%E5%86%85%E6%A0%B8%E8%A7%A3%E6%9E%90/" itemprop="url" rel="index"><span itemprop="name">Linux内核解析</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span><br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>2.9k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>3 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="Linux地址映射机制"><a href="#Linux地址映射机制" class="headerlink" title="Linux地址映射机制"></a>Linux地址映射机制</h1><p>讨论地址映射机制（逻辑地址和物理地址的映射）</p>
<hr>
<a id="more"></a>

<h3 id="页"><a href="#页" class="headerlink" title="页"></a>页</h3><p>物理页作为内存管理的基本单位，从虚拟内存的角度来看，页就是最小单位。32位体系结构支持4KB的页，而64位体系结构一般支持8KB的页。</p>
<p>内核用<code>struct page</code>结构表示系统中的每个物理页：</p>
<p><img src="https://s2.loli.net/2021/12/15/HvFjZ7rQlKbEuGk.png" alt="image-20211215123316364"></p>
<p>一个页可以由页缓存使用，<code>mapping</code>域就指向和这个页关联的<code>address_space</code>对象，或者作为私有数据，或者作为进程页表中的映射。</p>
<p><code>virtual</code>就为页的虚拟地址，通常情况下，它就是页在虚拟内存中的地址，高端内存并不永久映射到内核地址空间上，那么这个时候就是NULL，需要的时候再动态映射。</p>
<p>重点是该数据结构是与物理页相关而非虚拟页，内核仅仅只用这个数据结构描述当前时刻在相关物理页存放的东西，描述物理内存本身而非包含在其中的数据。</p>
<h3 id="区"><a href="#区" class="headerlink" title="区"></a>区</h3><p>由于硬件限制，内核不能将所有的页进行统一管理，有些页位于内存上特定的物理地址上，所以不能将其用于一些特定的任务。</p>
<p>所以内核把页划分为区，对具有相似特性的页进行分组来安排使用区。Linux必须处理以下问题：</p>
<ol>
<li>一些硬件只能用特定内存地址来执行DMA直接内存访问。</li>
<li>一些体系结构的内存物理寻址范围比虚拟寻址范围大得多，有一些内存无法永久映射到内核空间上。</li>
</ol>
<p>所以Linux主要划分4种区：</p>
<ol>
<li>ZONE_DMA，该区中的页可用于DMA操作。</li>
<li>ZONE_DMA32，和ZONE_DMA类似，该区包含的页面可用来执行DMA操作，但是页面只能由32位设备访问。</li>
<li>ZONE_NORMAL，包含能正常映射的页。</li>
<li>ZONE_HIGHMEM，包含高端内存，该区中的页不能永久映射到内核地址空间。</li>
</ol>
<p><img src="https://s2.loli.net/2021/12/15/PFewWKVGyORZv4o.png" alt="image-20211215135747564"></p>
<p>一个页分配可以从多个区中获取，但是不能同时从两个区分配，分配是不能跨区的。</p>
<p>如果是X86-64的64位体系结构，可以映射处理64位的内存空间，所以没有ZONE_HIGHMEM区。每个区都用struct zone表示：</p>
<p><img src="https://s2.loli.net/2021/12/15/573pEORuBlGXJwj.png" alt="image-20211215140009974"></p>
<p><code>name</code>域字符串表示这个区的名字，内核启动期间初始化该值。</p>
<p><code>watermark</code>数组维护该区内存池的最小最低最高值，内核使用水位为每个内存区设置合适的内存消耗基准。水位随空闲内存变化而变化。</p>
<p><code>lock</code>为自旋锁，但是该锁只保护结构，不保护区中的所有页，没有特定锁来保护单个页。</p>
<p>内存架构图：</p>
<p><img src="https://s2.loli.net/2021/12/15/GSDAweblWMZNjV1.png" alt="image-20211215141306159"></p>
<h3 id="组织虚拟地址"><a href="#组织虚拟地址" class="headerlink" title="组织虚拟地址"></a>组织虚拟地址</h3><p>虚拟地址对应虚拟地址空间，虚拟地址空间是虚拟地址的集合，用来映射物理内存。</p>
<p><img src="https://s2.loli.net/2021/12/15/ySNVu67sdR4UhEq.png" alt="image-20211215141523517"></p>
<p>虚拟空间又被划分为用户态和内核态。</p>
<p>每个进程都会对应一个用户态虚拟空间，里面存放了text段的内存虚拟地址范围，data段等等。</p>
<p><img src="https://s2.loli.net/2021/12/15/U7oXP2IjbSDM6kG.png" alt="image-20211215141708647"></p>
<p>一个进程对应的用户态中的各个方面的虚拟地址信息都由一个struct结构维护存放在内存，当创建进程的时候会为其分配内存存储对应的虚拟地址信息。</p>
<p>内核态结构：</p>
<p><img src="C:\Users\shentio\AppData\Roaming\Typora\typora-user-images\image-20211215141911458.png" alt="image-20211215141911458"></p>
<h3 id="用户态空间映射"><a href="#用户态空间映射" class="headerlink" title="用户态空间映射"></a>用户态空间映射</h3><p>用户空间采用动态映射，每个逻辑地址对应的物理地址是动态的，通过页表查询。</p>
<p>用户空间采用动态映射，每个虚拟地址可以被映射到一个物理空间，映射到<code>ZONE_HIGHMEM</code>。</p>
<p>由于物理内存是多个进程所有，如果直接将每个进程的用户空间都直接映射，对应物理地址冲突</p>
<h3 id="内核态高端内存的映射"><a href="#内核态高端内存的映射" class="headerlink" title="内核态高端内存的映射"></a>内核态高端内存的映射</h3><p>高端内存中的页不能永久映射到内核地址空间上，因此通过<code>alloc_page()</code>函数以<code>_GFP_HIGHMEM</code>标志获得的页不可能有逻辑地址。</p>
<p>尽管x86处理器寻址物理RAM的范围有4GB，但是高端内存并不会被自动地永久映射到内核地址空间。</p>
<h4 id="永久映射"><a href="#永久映射" class="headerlink" title="永久映射"></a>永久映射</h4><p>要映射一个给定的page结构到内核地址空间，使用函数<code>void kmap(struct page *page)</code></p>
<p>该函数可使用高端内存或者低端内存，如果page结构对应是低端内存中的页，函数只会单纯返回该页虚拟地址。页位于高端内存，则会建立一个永久映射，再返回地址。<code>kmap</code>只能被用于进程上下文中。</p>
<p>而且不需要高端内存时，应该解除映射：</p>
<p><code>void kunmap(struct page *page)</code></p>
<h4 id="临时映射"><a href="#临时映射" class="headerlink" title="临时映射"></a>临时映射</h4><p>当必须创建一个映射而当前的上下文又不能睡眠的时候，内核提供临时映射，也称原子映射。</p>
<p>有一组保留的映射，可以存放新创建的临时映射，内核可以原子地把高端内存中的一个页映射到某个保留的映射中，因此临时映射可以用在不能睡眠的地方。</p>
<h3 id="页表映射"><a href="#页表映射" class="headerlink" title="页表映射"></a>页表映射</h3><p>每个进程都有一个对应页表，内核只有一个内核页表。</p>
<p><img src="https://s2.loli.net/2021/12/15/F1YVbXJDmIrcnxU.png" alt="image-20211215142407449"></p>
<p>Linux一般用三级页表完成地址转换，利用多级页表来节约PTE空间。Linux对所有体系结构都使用三级页表管理。</p>
<p>顶级页表是页全局目录PGD，包含<code>pgd_t</code>类型数组，多数体系结构中等同于<code>unsigned int</code>。</p>
<p>PGD中的表项指向二极目录中的表项PMD。</p>
<p>二级页表是中间页目录，是<code>pmd_t</code>类型数组，表项指向PTE中的表项，最后一级页表其中包含<code>pte_t</code>类型的页表项，指向物理页面。</p>
<p><img src="https://s2.loli.net/2021/12/15/SVrwE8oi2vjPs6R.png" alt="image-20211215143930068"></p>
<p>多级页表：</p>
<p><img src="https://s2.loli.net/2021/12/15/qXAFfoadrRlz1W6.png" alt="image-20211215142915299"></p>
<h2 id="虚拟存储空间布局-32位"><a href="#虚拟存储空间布局-32位" class="headerlink" title="虚拟存储空间布局 32位"></a>虚拟存储空间布局 32位</h2><h3 id="关于概念辨析问题"><a href="#关于概念辨析问题" class="headerlink" title="关于概念辨析问题"></a>关于概念辨析问题</h3><p><strong>内核空间</strong>：内核空间表示运行在处理器最高级别的超级用户模式（supervisor mode）下的代码或数据，内核线性地址空间由所有进程共享，但只有运行在内核态的进程才能访问，用户进程可以通过系统调用切换到内核态访问内核空间，进程运行在内核态时所产生的地址都属于内核空间。</p>
<p><strong>线性地址空间</strong>：是指Linux系统中从0x00000000到0xFFFFFFFF整个4GB虚拟存储空间。</p>
<p><strong>用户空间</strong>：用户空间占用从0x00000000到0xBFFFFFFF共3GB的线性地址空间，每个进程都有一个独立的3GB用户空间，所以用户空间由每个进程独有，但是内核线程没有用户空间，因为它不产生用户空间地址。另外子进程共享（继承）父用户空间。运行在用户态和内核态的进程都可以访问用户进程的用户空间只是使用<strong>与父进程相同的用户线性地址到物理内存地址的映射关系，而不是共享父进程空间</strong>。</p>
<blockquote>
<p>Linux线性地址就是逻辑地址</p>
<p>linux的做法应该是 逻辑地址 = 0(base) +偏移量 使得逻辑地址和线性地址数值一致</p>
<p>段式内存管理中的段是一个处理器概念，由处理器来将段地址例如CS:EIP等映射成线性地址，这个过程程序感知不到，因为这是一个硬件过程，操作系统也控制不了。</p>
<p>在 Intel 平台下，逻辑地址(logical address)是 selector:offset 这种形式，selector 是 CS 寄存器的值，offset 是 EIP 寄存器的值。如果用 selector 去 GDT( 全局描述符表 ) 里拿到 segment base address(段基址) 然后加上 offset(段内偏移)，这就得到了 linear address。我们把这个过程称作段式内存管理。</p>
<p>如果再把 linear address 切成四段，用前三段分别作为索引去PGD、PMD、Page Table里查表，最终就会得到一个页表项(Page Table Entry)，那里面的值就是一页物理内存的起始地址，把它加上 linear address 切分之后第四段的内容(又叫页内偏移)就得到了最终的 physical address。我们把这个过程称作页式内存管理。<br> Virtual address内核的确是用到了这个概念，比如__va和__pa这两个宏定义，virtual address就是linear address的别名，俩词汇是一个意思，内核代码和我们编程中喜欢用virtual address这个术语，而Intel手册里只用linear address这个术语</p>
</blockquote>
<h3 id="逻辑地址映射：段页式"><a href="#逻辑地址映射：段页式" class="headerlink" title="逻辑地址映射：段页式"></a>逻辑地址映射：段页式</h3><p><img src="https://s2.loli.net/2022/01/11/VT7vRQs8K3jBaG1.png" alt="image-20220111204343188"></p>

    </div>
    
    
    

      <footer class="post-footer">
          
          <div class="post-tags">
              <a href="/tags/C/" rel="tag"><i class="fa fa-tag"></i> C</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/12/09/ss-lab5-Race-Condition/" rel="prev" title="Seed安全实验系列-(5)-竞态条件漏洞">
      <i class="fa fa-chevron-left"></i> Seed安全实验系列-(5)-竞态条件漏洞
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/12/15/os-schoollab-7/" rel="next" title="LRU算法&&首次适应分配及位图维护内存分配实现">
      LRU算法&&首次适应分配及位图维护内存分配实现 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Linux%E5%9C%B0%E5%9D%80%E6%98%A0%E5%B0%84%E6%9C%BA%E5%88%B6"><span class="nav-number">1.</span> <span class="nav-text">Linux地址映射机制</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%A1%B5"><span class="nav-number">1.0.1.</span> <span class="nav-text">页</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%8C%BA"><span class="nav-number">1.0.2.</span> <span class="nav-text">区</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%BB%84%E7%BB%87%E8%99%9A%E6%8B%9F%E5%9C%B0%E5%9D%80"><span class="nav-number">1.0.3.</span> <span class="nav-text">组织虚拟地址</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%94%A8%E6%88%B7%E6%80%81%E7%A9%BA%E9%97%B4%E6%98%A0%E5%B0%84"><span class="nav-number">1.0.4.</span> <span class="nav-text">用户态空间映射</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%86%85%E6%A0%B8%E6%80%81%E9%AB%98%E7%AB%AF%E5%86%85%E5%AD%98%E7%9A%84%E6%98%A0%E5%B0%84"><span class="nav-number">1.0.5.</span> <span class="nav-text">内核态高端内存的映射</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E6%B0%B8%E4%B9%85%E6%98%A0%E5%B0%84"><span class="nav-number">1.0.5.1.</span> <span class="nav-text">永久映射</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E4%B8%B4%E6%97%B6%E6%98%A0%E5%B0%84"><span class="nav-number">1.0.5.2.</span> <span class="nav-text">临时映射</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%A1%B5%E8%A1%A8%E6%98%A0%E5%B0%84"><span class="nav-number">1.0.6.</span> <span class="nav-text">页表映射</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%99%9A%E6%8B%9F%E5%AD%98%E5%82%A8%E7%A9%BA%E9%97%B4%E5%B8%83%E5%B1%80-32%E4%BD%8D"><span class="nav-number">1.1.</span> <span class="nav-text">虚拟存储空间布局 32位</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%85%B3%E4%BA%8E%E6%A6%82%E5%BF%B5%E8%BE%A8%E6%9E%90%E9%97%AE%E9%A2%98"><span class="nav-number">1.1.1.</span> <span class="nav-text">关于概念辨析问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%80%BB%E8%BE%91%E5%9C%B0%E5%9D%80%E6%98%A0%E5%B0%84%EF%BC%9A%E6%AE%B5%E9%A1%B5%E5%BC%8F"><span class="nav-number">1.1.2.</span> <span class="nav-text">逻辑地址映射：段页式</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Sekla"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Sekla</p>
  <div class="site-description" itemprop="description">Sekla</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">100</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">23</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">14</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/ShenTiao" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;ShenTiao" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:584892986@qq.com" title="E-Mail → mailto:584892986@qq.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

      <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1416875904&auto=0&height=66"></iframe>
      
    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Sekla</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">288k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">4:22</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script size="300" alpha="0.6" zIndex="-1" src="/lib/canvas-ribbon/canvas-ribbon.js"></script>
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/shizuku.model.json"},"display":{"position":"left","width":250,"height":500},"mobile":{"show":false},"react":{"opacity":0.9},"log":false});</script></body>
</html>

<script type="text/javascript" src="/js/src/love.js"></script>
